//
//  BQYLLeftTableViewCell.m
//  BeeQuick
//
//  Created by 杨雷 on 2016/11/19.
//  Copyright © 2016年 six_group. All rights reserved.
//

#import "BQYLLeftTableViewCell.h"

@implementation BQYLLeftTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        [self setupUI];
    }
    return self;
}

#pragma mark - 界面
- (void)setupUI
{
    //cell背景色
    self.contentView.backgroundColor = [UIColor cz_colorWithHex:0xf8f8f8];
    
    //字体大小 颜色
    self.textLabel.font = [UIFont systemFontOfSize:13];
    self.textLabel.textColor = [UIColor cz_colorWithHex:0x9f9f9f];
    self.textLabel.textAlignment = NSTextAlignmentCenter;
    //设置选中View
    UIView *selectedView = [[UIView alloc]init];
    selectedView.backgroundColor = [UIColor whiteColor];
    self.selectedBackgroundView = selectedView;
    
    //黄条
    UIView *yellowLine = [[UIView alloc]init];
    yellowLine.backgroundColor = [UIColor yellowColor];
    [selectedView addSubview:yellowLine];
    
    //分割线
    UIView *line = [[UIView alloc]init];
    line.backgroundColor = [UIColor cz_colorWithHex:0x9f9f9f];
    [self.contentView addSubview:line];
    
    //布局
    [line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(self.contentView);
        make.height.mas_equalTo(1/[UIScreen mainScreen].scale);
    }];
    [yellowLine mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.mas_equalTo(35);
        make.width.mas_equalTo(4);
        make.centerY.left.equalTo(selectedView);
    }];
    
    
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
